package com.sstock.smartstock;

import android.os.Message;

public class GetMessage {

	
	public static final String KEY_STOCK_CODE = "stock_code";
	/**
	 *  catch the message Globals.UINAME_LISTDATE
	 */
	static String getListDate(Message msg) {
		
		String listdate = msg.getData().getString(Globals.UINAME_LISTDATE);
		return listdate;
	}
	
	/**
	 * catch the message add Globals.UINAME_ADD_CODE
	 */
	static String getAddCode(Message msg) {
		
		String code = msg.getData().getString(Globals.UINAME_ADD_CODE);
		return code;
	}
	
	/**
	 * catch the message Globals.UINAME_NOTES
	 */
	static String getNotes(Message msg) {
		
		String notes = msg.getData().getString(Globals.UINAME_NOTES);
		return notes;
	}
	
	/**
	 * catch the message Globals.UINAME_ALARM_UPBOUND
	 */
	static String getAlarmUpbound(Message msg) {
		
		String alarmUpbound = msg.getData().getString(Globals.UINAME_ALARM_UPBOUND);
		return alarmUpbound;
	}
	
	/**
	 * catch the message Globals.UINAME_ALARM_BOBOUND
	 */
	static String getBoboundUpbound(Message msg) {
		
		String alarmUpbound = msg.getData().getString(Globals.UINAME_ALARM_BOBOUND);
		return alarmUpbound;
	}
	
	/**
	 * catch the message Globals.UINAME_UPBOUND_UNIT
	 */
	static String getUpboundUnit(Message msg) {
		
		String upboundunit = msg.getData().getString(Globals.UINAME_UPBOUND_UNIT);
		return upboundunit;
	}
	
	/**
	 * catch the message Globals.UINAME_BOBOUND_UNIT
	 */
	static String getBoboundUnit(Message msg) {
		
		String boboundunit = msg.getData().getString(Globals.UINAME_BOBOUND_UNIT);
		return boboundunit;
	}
	
	/**
	 * catch the message Globals.UINAME_ALARM_UPBOUNDVALID
	 */
	static boolean getAlarmUpboundValid(Message msg) {
		
		boolean alarmupboundvalid = msg.getData().getBoolean(Globals.UINAME_ALARM_UPBOUNDVALID);
		return alarmupboundvalid;
	}
	
	/**
	 * catch the message Globals.UINAME_ALARM_BOBOUNDVALID
	 */
	static boolean getAlarmBoboundValid(Message msg) {
		
		boolean alarmboboundvalid = msg.getData().getBoolean(Globals.UINAME_ALARM_BOBOUNDVALID);
		return alarmboboundvalid;
	}
	
	/**
	 * catch the message Simulate Number
	 */
	static String getSimulateNumber(Message msg) {
		
		String simnum = msg.getData().getString(KEY_STOCK_CODE);
		return simnum;
	}
	
	/**
	 * catch the message Simulate Price
	 */
	static String getSimulatePrice(Message msg) {
		
		String simprice = msg.getData().getString(KEY_STOCK_CODE);
		return simprice;
	}
	
	/**
	 * catch the message Flag of Simulate
	 */
	static String getNumberFlag(Message msg) {
		
		String flag = msg.getData().getString(KEY_STOCK_CODE);
		return flag;
	}

}
